// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'//element-ui配置
import VueWechatTitle from 'vue-wechat-title'//vue动态title
import store from './store'//Vuex状态管理
import './styles/common.scss'//全局样式
import '@/icons' // icon导入
import '@/permission' // 路由跳转权限控制：permission.js
import RightToolbar from "@/components/RightToolbar"// 自定义表格右上方工具组件
import { mapGetters } from 'vuex' //vuex访问全局变量

//全局混入companyId
Vue.mixin({
  computed: {
    ...mapGetters(['companyId'])
  }
})

//组件全局注册
Vue.component('RightToolbar', RightToolbar)

Vue.config.productionTip = false

Vue.use(VueWechatTitle)//vue动态title
Vue.use(Element)
Vue.use(router)

/*引入axios*/
import Axios from "axios";

Vue.prototype.axios = Axios;

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
